<?php
class Admin_Model_Group extends Zend_Db_Table_Abstract{
	protected $_name = "group";
	protected $_primary = "group_id";
	
	public function show_group(){
		$query = $this -> select();
		$query->from('group',array('group_id','name'));
		$data = $this-> fetchAll($query);
		return $data -> toArray();
	}
	
	public function insert_group($data){
		$this->insert($data);
	}
	
	public function delete_group($id){
		$where="id=".$id;
    	$this->delete($where);
	}

	public function update_group($id,$data){		
		$where = "id=".$id;
		$this->update($data,$where);
		
	}	
}